package com.bonuo.crm.mapper;

import com.bonuo.crm.domain.Activity;
import com.bonuo.crm.domain.vo.CrmIndex;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ActivityMapper {
    List<Activity> selectActivityList(Activity activity);

    Integer insertActivity(Activity activity);

    Integer deleteActivityById(Integer id);

    Integer updateActivity(Activity activity);

    Integer selectRepeatActivity(Activity activity);

    //用来查询当前登录用户以及他的下级用户
    //List<String> getChildrenAndMineInfo(@Param("deptId") Integer deptId, @Param("userId") Integer userId);

    Integer getSameMonthCountProcess(@Param("schedule") int schedule, @Param("createBy") String createBy);

    Integer getSameMonthCountVisit(String createBy);

//    List<CrmIndex> getThreeMonthCount(@Param("schedule") int schedule, @Param("createBy") String createBy);

    CrmIndex getOneMonthCount(@Param("schedule") int schedule, @Param("userId") Integer userId);

    CrmIndex getOneMonthCountVisit(Integer userId);

    CrmIndex getOneMonthCountActivity(Integer userId);

    CrmIndex getOneMonthCountWeeklyNewspaper(Integer userId);

    Integer getOneYearCount(@Param("schedule") int schedule, @Param("userId") Integer userId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Integer getOneYearMarketActivity(@Param("userId")Integer userId,@Param("startDate") Date startDate,@Param("endDate") Date endDate);

    Integer getOneYearVisitNum(@Param("userId")Integer userId,@Param("startDate") Date startDate,@Param("endDate") Date endDate);

    Integer marketActivityByYear(@Param("userId") Integer userId,@Param("startDate") Date startDate,@Param("endDate") Date endDate);

    List<Activity> selectWeeklyActivityList(Integer userId);
}